package com.itkongxiaoyi.mapper;

import com.itkongxiaoyi.entity.Student;
import com.itkongxiaoyi.entity.StudentQueryParam;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface StudentMapper {

     /**
     * 根据id查询学生信息(回显)
     * @param id
     * @return
     */
     Student getById(Integer id) ;

    /**
     * 学生信息数据访问接口
     */
    @Insert("insert into student_info(studentNo, name, idCard, `admissionYear`, college, major,className, gender, age, phone, score,` time` ,createTime,updateTime) " +
            "VALUES (#{studentNo}, #{name}, #{idCard}, #{admissionYear},#{college}, #{major}, #{className}, #{gender}, #{age}, #{phone}, #{score},#{time},#{createTime},#{updateTime})")
     void insert(Student student) ;
    /**
     * 列表查询
     *
     * @return
     */
    List<Student> list(StudentQueryParam param);

    /**
     * 根据id删除学生信息（可进行多个学生信息删除）
     * @param ids
     */
    void delete(List<Integer> ids);
    /**
     * 修改学生信息
     * @param student
     */
    void update(Student student);

}
